package com.aperos;

import android.app.Activity;
import android.content.Context;
import android.content.Intent;
import android.content.pm.ActivityInfo;
import android.os.Bundle;
import android.util.DisplayMetrics;
import android.widget.AbsoluteLayout.LayoutParams;
import android.widget.LinearLayout;

public class Loading extends Activity implements Runnable {
	public Context context;
	public LinearLayout dialogBar;
	
    /** Called when the activity is first created. */
    @Override
    public void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
       
        try {
        	
        	setContentView(R.layout.loading);
        	context = this;
        	setRequestedOrientation(ActivityInfo.SCREEN_ORIENTATION_PORTRAIT);
        	
	        if (getString(R.string.app_langue).equals("francais")) {
	        	this.getWindow().setBackgroundDrawableResource(R.drawable.pagedemarrage);
	        } else {
	        	this.getWindow().setBackgroundDrawableResource(R.drawable.pagedemarrage_en);
	        }
	        new Thread(this).start();
	        
        } catch (Exception e) {
			e.printStackTrace();
		}

    }



	@Override
	public void run() {
		try { 
			Service.initListBars(context);
			
			Intent myIntent = new Intent(context, AperosPasChers.class);
			context.startActivity(myIntent);
		} catch (Exception e) {
			e.printStackTrace();
		}
	}
    
	
}

